#include <stdio.h>

int main() {
    int n, i, j;
    long long factorial;
    scanf("%d", &n);
    for (i = 1; i <= n; i++) {
        factorial = 1;
        for (j = 1; j <= i; j++) {
            factorial *= j;
        }
        printf("%-4d%-20lld\n", i, factorial);
    }
    return 0;
}
